<!DOCTYPE html>
<style>
div {
    width: 100px;
    height: 50px;
}
.container {
    contain: paint;
    background-color: green;
}
.transform {
    background-color: red;
    top: 100px;
    transform: translateZ(0) scaleY(2) translateX(100px);
}
.inline {
    display: inline-block;
}
</style>
<body>
<div class="container"><div class="transform"></div></div>
<div class="container inline"><div class="transform"></div></div>